package Chuong03;

import java.awt.Color;
import java.awt.Graphics;

import javax.swing.JFrame;
import javax.swing.JPanel;

public class Bai02 extends JPanel{
	public void paintComponent(Graphics g){
		super.paintComponent(g);
		for(int i = 0; i <= 255; i++){
			g.setColor(new Color(0,i,0));
			g.drawLine(i, 0, i, 200);
		}
	}
	public static void main(String[] args) {
		JFrame f = new JFrame("Chuong03_02");
		f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		Bai02 panel = new Bai02();
		f.add(panel);
		f.setSize(400, 400);
		f.setVisible(true);
	}

}
